package com.itheima;

import com.itheima.dao.UserDao;
import com.itheima.service.OrderService;
import com.itheima.service.UserService;
import com.itheima.xyz.X;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author huyoufu <https://github.com/huyoufu>
 * @TIME 2020-08-06 09:20
 * @description 演示 对象之间依赖 存在多个怎么办
 */
public class Test02 {
    public static void main(String[] args) {
        //创建一个spring的容器对象

        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");

        //获取一个orderService

        OrderService orderService = context.getBean(OrderService.class);

        System.out.println("得到的这个orderService:"+orderService);

    }
}
